import 'package:flutter/material.dart';
import 'package:provide/provide.dart';
import 'package:xv_flutter/loading.dart';
import 'package:xv_flutter/provide/provides.dart';
import 'package:fluro/fluro.dart';
import 'package:xv_flutter/router/application.dart';
import 'package:xv_flutter/router/routers.dart';

void main() => runApp(ProviderNode(child: MyApp(), providers: provides));

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final router = Router();
    Routers.configureRouters(router);
    Application.router = router;

    return MaterialApp(
      onGenerateRoute: Application.router.generator,
      debugShowCheckedModeBanner: false,
      title: '玫瑰花海',
      theme: mDefaultTheme,
      home: Center(
        child: LoadingPage(),
      ),
    );
  }
}

// 自定义主题
final ThemeData mDefaultTheme = ThemeData(primaryColor: Colors.redAccent);
